<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .sliderbar {
            position: fixed;
            width: 40px;
            height: 40px;
            line-height: 40px;
            top: 50%;
            right: 0px;
            color: #fff;
            text-align: center;
            cursor: pointer;

        }


        .con {
            position: absolute;
            width: 200px;
            height: 40px;
            background-color: purple;
            text-align: center;
            top: 0;
            left: 0;
            z-index: -1;

        }
    </style>
    <script src='js/animate动画函数封装.js'></script>
</head>

<body>
    <div class="sliderbar">
        <span>←</span>
        <div class="con">问题反馈</div>
    </div>
</body>
<script>
    var sliderbar = document.querySelector('.sliderbar');
    var con = document.querySelector('.con');
    sliderbar.addEventListener('mouseenter', function () {
        animate(con, -160, function () {
            sliderbar.children[0].innerHTML = '→';

        })
    })

    sliderbar.addEventListener('mouseleave', function () {
        animate(con, 0, function () {
            sliderbar.children[0].innerHTML = '←';

        })
    })

</script>

</html>